<?php
session_start();
include './functions.php';
function __autoload($className){
	if(substr($className, -10)=='Controller'){
		include "./Controller/{$className}.php";
	}else{
		include "./Tool/{$className}.php";
	}
}
//控制器
$c = isset($_GET['c']) ? $_GET['c'] : 'Index';
$c = "{$c}Controller";
$c =new $c;
//方法
$a =isset($_GET['a']) ? $_GET['a'] : 'Index';
$c->$a();